from rest_framework.serializers import ModelSerializer
from miaoapp.models import *


# 公司表序列化器
class CompanySer(ModelSerializer):
    class Meta:
        model = Company
        fields = "__all__"


# 权限表序列化器
class PowerSer(ModelSerializer):
    class Meta:
        model = Power
        fields = "__all__"


# 用户表序列化器
class UserSer(ModelSerializer):
    class Meta:
        model = User
        fields = "__all__"


# 用户权限关系表序列化器
class UserPowerSer(ModelSerializer):
    class Meta:
        model = UserPower
        fields = "__all__"


# 标签信息表序列化器
class TagSer(ModelSerializer):
    class Meta:
        model = Tag
        fields = "__all__"


# 设备表序列化器
class GenreSer(ModelSerializer):
    class Meta:
        model = Genre
        fields = "__all__"


# 报警类型表序列化器
class WarnSer(ModelSerializer):
    class Meta:
        model = Warn
        fields = "__all__"


# 货物类型表序列化器
class FixingSer(ModelSerializer):
    class Meta:
        model = Fixing
        fields = "__all__"


# 温度表序列化器
class TemperatureSer(ModelSerializer):
    class Meta:
        model = Temperature
        fields = "__all__"


# 运单表序列化器
class OrderSer(ModelSerializer):
    class Meta:
        model = Order
        fields = "__all__"


# 收发货地址序列化器
class SendAddressSer(ModelSerializer):
    class Meta:
        model = SendAddress
        fields = "__all__"

# 收发货地址序列化器
class TakeAddressSer(ModelSerializer):
    class Meta:
        model = TakeAddress
        fields = "__all__"

# 客户表序列化器
class CustomerSer(ModelSerializer):
    class Meta:
        model = Customer
        fields = "__all__"
